﻿
using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Routing;
namespace You.Niao.Tour.Area
{
    public class TourAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Tour";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            //foreach (var route in GetRoutes())
            //    context.Routes.Add(route);
        }

        //public IEnumerable<Route> GetRoutes()
        //{
            //return new[] { 
            //    new Route(
            //        "wiki",
            //        new RouteValueDictionary { { "area", AreaName }, { "controller", "wiki" }, { "action", "Index" }},
            //        new RouteValueDictionary(),
            //        new RouteValueDictionary { { "area", AreaName }},
            //        new MvcRouteHandler()
            //    ),
            //    new Route(   //默认
            //        "wiki/{action}/{id}",
            //        new RouteValueDictionary { { "area", AreaName }, { "controller", "wiki" }, { "action", "Index" },{"id",""} },
            //        new RouteValueDictionary(),
            //        new RouteValueDictionary { { "area", AreaName }},
            //        new MvcRouteHandler()
            //    ),
            //     new Route(
            //        "User",
            //        new RouteValueDictionary { { "area", AreaName }, { "controller", "User" }, { "action", "Index" }},
            //        new RouteValueDictionary(),
            //        new RouteValueDictionary { { "area", AreaName }},
            //        new MvcRouteHandler()
            //    ),
            //    new Route(   //默认
            //        "User/{action}/{id}",
            //        new RouteValueDictionary { { "area", AreaName }, { "controller", "User" }, { "action", "Index" },{"id",""} },
            //        new RouteValueDictionary(),
            //        new RouteValueDictionary { { "area", AreaName }},
            //        new MvcRouteHandler()
            //    ),
                
            //};

        //}
    }
}

